import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;


public class Main 
{
	public static void main(String[] args) throws IOException 
	{
		DupeFile("test.txt","test4.txt");
		ShuffleFiles("test.txt","test2.txt","test3.txt");
		SuperShuffleFiles("test.txt","test2.txt","test5.txt");
		
		/*
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		String in = br.readLine();
		while (in != null)
		{
			bw.write(in + "\n");
			bw.flush();
			in = br.readLine();
		}
		*/
		
		/*
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("test1.txt")));
		
		String in = br.readLine();
		while (in != null)
		{
			bw.write(in + "\n");
			bw.flush();
			in = br.readLine();
		}
		*/
	}
	
	public static void DupeFile(String f1, String f2) throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(f1)));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f2)));
		
		String in = br.readLine();
		while (in != null)
		{
			bw.write(in + "\n");
			bw.flush();
			in = br.readLine();
		}
	}
	
	public static void ShuffleFiles(String f1, String f2, String f3) throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(f1)));
		BufferedReader br2 = new BufferedReader(new InputStreamReader(new FileInputStream(f2)));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f3)));
		
		String in = br.readLine();
		String in2 = br2.readLine();
		while (in != null || in2 != null)
		{
			bw.write(in + "\n" + in2 + "\n");
			bw.flush();
			in = br.readLine();
			in2 = br2.readLine();
		}
	}
	
	public static void SuperShuffleFiles(String f1, String f2, String f3) throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(f1)));
		BufferedReader br2 = new BufferedReader(new InputStreamReader(new FileInputStream(f2)));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f3)));
		
		String in = br.readLine();
		String in2 = br2.readLine();
		
		while (in != null || in2 != null)
		{
			for (int i = 0; i < 100; i++)
			{
				if (in.substring(i, i + 1) == " " || in2.substring(i, i + 1) == " ")
				{
					break;
				}
				
				bw.write(in.substring(i, i + 1));
				bw.write(in2.substring(i, i + 1));
			}
			bw.write("\n");
			bw.flush();
			in = br.readLine();
			in2 = br2.readLine();
		}
	}
}
